package cn.lili.modules.whitebar.entity.dos;

import cn.lili.mybatis.BaseEntity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 授信管理
 *
 * @author 贾送兵
 * @since
 */
@Data
@TableName("li_credit_management")
@ApiModel(value = "授信管理")
public class CreditManagement extends BaseEntity {

    private static final long serialVersionUID = -5339221840646353417L;

    @ApiModelProperty(value = "商户名称")
    private String name;

    @ApiModelProperty(value = "商户类型")
    private String nameType;
    @ApiModelProperty(value = "商户类型名称")
    private String nameTypeText;

    @ApiModelProperty(value = "用户联系信息")
    private String contactInformation;
    @ApiModelProperty(value = "用户地址")
    private String userAddress;

    @ApiModelProperty(value = "授信额度")
    private Double creditLine;

    @ApiModelProperty(value = "已用额度")
    private Double usedLimit;

    @ApiModelProperty(value = "剩余额度")
    private Double remainingQuota;


    @ApiModelProperty(value = "授信周期")
    private Integer creditPeriod;

    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss || yyyy-MM-dd || yyyy/MM/dd HH:mm:ss|| yyyy/MM/dd ||epoch_millis")
    @ApiModelProperty(value = "授信日期")
    private Date creditDate;
    @ApiModelProperty(value = "操作人信息")
    private String operator;
    @ApiModelProperty(value = "授信状态 1启用 0冻结")
    private String creditStatus;
    @ApiModelProperty(value = "授信状态名称")
    private String creditStatusText;

    @ApiModelProperty(value = "到期日期")
    private String expiryDate;

    @ApiModelProperty(value = "到期未还时间")
    private String overdue;

    @ApiModelProperty(value = "冻结原因")
    private String freezeReason;

    @ApiModelProperty(value = "会员Id")
    private String memberId;



}